import layout from "@/components/layout/index"
export const routes = [{
        path: "/main", //主页
        alias: "/main",
        component: layout,
        children: [{
                path: "/home", //首页
                alias: "/",
                component: () =>
                    import ("@/pages/home/home.vue")
            }, {
                path: "/details", //详情页
                alias: "/",
                props: (router) => {
                    return {
                        cateId: router.query.id
                    }
                },
                component: () =>
                    import ("@/pages/details/details.vue")
            },
            {
                path: "/oders", //订单
                alias: "/",
                meta: {
                    isLogin: true
                },
                component: () =>
                    import ("@/pages/oders/oders.vue")
            },
            {
                path: "/research", //考证
                alias: "/",
                meta: {
                    isLogin: true
                },
                component: () =>
                    import ("@/pages/research/research.vue")
            },
            {
                path: "/signUp", //报名页
                alias: "/",
                component: () =>
                    import ("@/pages/signUp/signUp.vue"),
            }, {
                path: "/user", //用户页
                alias: "/",
                component: () =>
                    import ("@/pages/user/user.vue")
            }
        ]
    },
    {
        path: "/login", //登陆页
        alias: "/",
        component: () =>
            import ("@/pages/login/login.vue")
    },
    {
        path: "/register", //注册页
        alias: "/",
        component: () =>
            import ("@/pages/register/register.vue")
    },
    {
        path: "*", //404页
        alias: "/",
        component: () =>
            import ("@/pages/404/404.vue")
    }
]